package cn.itsource.product.domain;

import cn.itsource.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Product extends BaseDomain {
    private String name;
    //资源地址，多个逗号分割
    private String resources;
    private BigDecimal saleprice;//精确到分
    private BigDecimal costprice;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
    private Date offsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
    private Date onsaletime;
    private Integer state = 0;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
    private Date createtime = new Date();
    private Long salecount;

    //接收前端传的详情
    private ProductDetail detail;

}
